package com.lqwu.mallchatserver.chat.service;

import com.lqwu.mallchatserver.chat.model.dto.*;
import com.lqwu.mallchatserver.chat.model.vo.ChatMemberListResp;
import com.lqwu.mallchatserver.chat.model.vo.ChatRoomResp;
import com.lqwu.mallchatserver.chat.model.vo.MemberResp;
import com.lqwu.mallchatserver.common.domain.vo.request.CursorPageBaseReq;
import com.lqwu.mallchatserver.common.domain.vo.response.CursorPageBaseResp;
import com.lqwu.mallchatserver.websocket.model.vo.response.data.ChatMemberResp;

import javax.validation.Valid;
import java.util.List;


public interface RoomAppService {
    /**
     * 获取会话列表--支持未登录态
     * @param request
     * @param uid
     */
    CursorPageBaseResp<ChatRoomResp> getContactPage(CursorPageBaseReq request, Long uid);

    /**
     * 获取用户所在群组详情
     * @param uid
     * @param roomId
     * @return
     */
    MemberResp getGroupDetail(Long uid,Long roomId);

    /**
     * 删除群组成员
     * @param uid
     * @param request
     */
    void delMember(Long uid, @Valid MemberDelReq request);

    /**
     * 新增群组
     * @param uid 群主id
     * @param request 新增群组参数
     * @return
     */
    Long addGroup(Long uid, @Valid GroupAddReq request);

    /**
     * 邀请加入群组
     * @param uid 用户id
     * @param request
     */
    void addMember(Long uid, @Valid MemberAddReq request);

    /**
     * 游标分页查询群组成员列表
     * @param request
     * @return
     */
    CursorPageBaseResp<ChatMemberResp> getMemberPage(@Valid MemberReq request);

    /**
     * 获取群组成员列表
     * @param request
     * @return
     */
    List<ChatMemberListResp> getMemberList(@Valid ChatMessageMemberReq request);
}
